
import request from '@/sheep/request';

export default {
  // 首页统计
  homeCount: () =>
    request({
      url: '/h5/miao/monitorTask/homeCount',
      method: 'GET',
      custom: {
        showLoading: false,
        auth: true,
      },
    }),
  // 添加内测订阅
  addBeta: (data) =>
    request({
      url: '/h5/miao/monitorTask/addBeta',
      method: 'POST',
      data: data
    }),
  // 更新内测订阅
  updateBeta: (data) =>
      request({
        url: '/h5/miao/monitorTask/updateBeta',
        method: 'POST',
        data: data
      }),
  // 任务详情
  taskInfo: (taskId) =>
      request({
        url: `/h5/miao/monitorTask/${taskId}`,
        method: 'GET'
      }),
  // 停止监测任务
  stop: (id) =>
      request({
        url: '/h5/miao/monitorTask/stop/' + id,
        method: 'POST'
      }),
  // 开始监测任务
  start: (id) =>
      request({
        url: '/h5/miao/monitorTask/start/' + id,
        method: 'POST'
      }),
  // 删除内测订阅
  del: (id) =>
      request({
        url: '/h5/miao/monitorTask/delete/' + id,
        method: 'DELETE'
      }),
  // 任务监测商品列表
  recentNewProduct: (query) =>
      request({
        url: '/h5/miao/monitorTask/recentNewProduct',
        method: 'GET',
        custom: {
          showLoading: false,
          auth: true,
        },
        params: query
      }),
  // 查询监测任务列表
  monitorTaskList: (query) =>
      request({
        url: '/h5/miao/monitorTask/list',
        method: 'GET',
        custom: {
          showLoading: false,
          auth: true,
        },
        params: query
      }),
  // 推送平台列表
  pushPlatformList: (query) =>
      request({
        url: '/h5/miao/monitorTask/pushPlatformList',
        method: 'GET',
        custom: {
          showLoading: false,
          auth: true,
        },
        params: query
      }),
  // 订阅套餐列表
  subConfigList: (query) =>
      request({
        url: '/h5/miao/monitorTask/subConfigList',
        method: 'GET',
        custom: {
          showLoading: false,
          auth: true,
        },
        params: query
      }),
};
